/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package vehicle.beans;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import vehicle.bol.CustomerBOL;
import vehicle.entity.Customer;

/**
 *
 * @author lab1
 */
@ManagedBean
@SessionScoped
public class CustomerBean {

    /** Creates a new instance of CustomerBean */
    private String customerName;
    private String cusPassword;
    private Customer cus;
    CustomerBOL bolcus=new CustomerBOL();

    public Customer getCus() {
        return cus;
    }

    public void setCus(Customer cus) {
        this.cus = cus;
    }

    public String getCusPassword() {
        return cusPassword;
    }

    public void setCusPassword(String cusPassword) {
        this.cusPassword = cusPassword;
    }

    public String getCustomerName() {
        return customerName;
    }

    public void setCustomerName(String customerName) {
        this.customerName = customerName;
    }
    public CustomerBean() {
       
    }
   
    public String checkLogin()
    {
        cus=bolcus.checkLogin(cusPassword, cusPassword);
        if(cus !=null)
        {
            return "success";

        }else{

            return "fails";
        }
        
    }
}
